/**
 *  Desc:   项目管理
 *  Author: 刘玉峰
 *  Date:   2021-06-15 10:07
 */

 import request from "@/utils/request";
 import { removeEmptyKeys } from "@/utils/utils";

 export async function loadProject(params) {
    params = removeEmptyKeys(params);
    return request.get(`/api/admin/projectList`, {
      params
    });
  }

  export async function loadProjectDetail(id) {
    return request.get(`/api/admin/projectDetail/${id}`); 
  }

  export async function addProject(params) {
    params = removeEmptyKeys(params);
    return request.post(`/api/admin/addProject`, {
      params
    });
  }

  export async function deleteProject(id) {
    return request.get(`/api/admin/deleteProject/${id}`); 
  }

  export async function getAllProject() {
    return request.get(`/api/admin/getAllProject`); 
  }
  